package com.tungse.study.mini_spring.interceptor;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
 * @Author : Tungse
 * @Date: 2025/4/13 10:30
 * @Description:
 */
public interface MyHandlerInterceptorAdapter {
    /**
     * This implementation always returns {@code true}.
     */
    default boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {

        return true;
    }

    /**
     * This implementation is empty.
     */
    default void postHandle(
            HttpServletRequest request, HttpServletResponse response, Object handler, Object modelAndView) {
    }

    /**
     * This implementation is empty.
     */
    default void afterCompletion(
            HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
    }
}
